package pers.vic.test.thymeleaf;

import org.thymeleaf.dialect.AbstractProcessorDialect;
import org.thymeleaf.processor.IProcessor;

import java.util.HashSet;
import java.util.Set;

/**
 * 描述:自定义的权限方言
 *   参见：StandardDialect
 * @author Vic.xu
 * @date 2022-02-11 9:26
 */
public class VicCustomerDialect extends AbstractProcessorDialect {

    public static final String NAME = "vic";
    public static final String PREFIX = "vic";
    public static final int PROCESSOR_PRECEDENCE = 1000;

    public VicCustomerDialect() {
        super(NAME, PREFIX, PROCESSOR_PRECEDENCE);
    }

    @Override
    public Set<IProcessor> getProcessors(String dialectPrefix) {
        Set<IProcessor> set = new HashSet<>();
        set.add(new AuthElementTagProcessor(dialectPrefix));
        set.add(new PcodeElementTagProcessor(dialectPrefix));
        return set;
    }
}
